<?php

namespace App\Requests\Api\Employees;

use Illuminate\Foundation\Http\FormRequest;

/**
 * 用户列表校验
 * Class ListReques
 * @package App\Requests\Api\Users
 */
class EmployeesListRequest extends FormRequest {
    public function authorize() {
        return true;
    }

    public function rules() {
        return [
            'school_id'   => 'sometimes|integer',
            'identity_id' => 'sometimes|integer',
            'page'        => 'required|integer',
            'page_count'  => 'required|integer',
        ];
    }

    public function messages() {
        return [
            'school_id.integer'   => '校区参数错误',
            'identity_id.integer' => '身份参数错误',
            'page.required'       => 'page错误',
            'page.integer'        => 'page错误',
            'page_count.required' => 'page_count 错误',
            'page_count.integer'  => 'page_count 错误',
        ];
    }
}